<template>
	<view class="box">
		<view class="btns">
			<view class="btns-item" v-for="(item,index) in btnData" :key="index">
				<view class="icon" :style="{backgroundImage:'url(' + item.img + ')'}"></view>
				<view class="text">
					{{item.text}}
				</view>
			</view>
		</view>
		<view class="pay" @click="okays">立即下单</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				btnData: [{
					id: 1,
					text: "首页",
					img: "/static/detail/home.png"
				}, {
					id: 2,
					text: "客服",
					img: "/static/detail/customer.png"
				}, {
					id: 3,
					text: "收藏",
					img: "/static/detail/collection.png"
				}],
				opensids:""
			}
		},
		onLoad(optione) {
			this.opensids=optione
		},
		methods: {
			okays(){
				uni.navigateTo({
					url:`/pages/mys/details/details?${this.opensids}`
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.box {
		width: 90%;
		height: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;

		.btns {
			width: 320rpx;
			height: 100rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;

			.btns-item {
				width: 100rpx;
				height: 80%;
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: space-between;

				.icon {
					width: 45rpx;
					height: 45rpx;
					background-size: contain;
				}

				.text {
					font-size: 26rpx;
				}
			}
		}

		.pay {
			width: 300rpx;
			height: 80rpx;
			background-color: #fcd748;
			border-radius: 80rpx;
			text-align: center;
			line-height: 80rpx;
			font-weight: bold;
			font-size: 28rpx;
		}
	}
</style>